<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="alert alert-warning-light">
        重要提示：

        <p>1.保存设置后，在操作按钮设置分润！！！</p>
    </div>
    <div class="">
        <div id="toolbar" class="toolbar">
            <a id="patch" href="javascript:;" class="btn btn-success btn-add" title="{:__('批量')}"><i class="fa fa-plus"></i>
                {:__('批量')}</a>
        </div>
        <table class="table table-striped table-bordered table-hover table-nowrap" style="text-align: center;">
            <tr>
                <th style="text-align: center;">多选</th>
                <th style="text-align: center;" width="20%">卡类型</th>
                <th style="text-align: center;" width="20%">交易类型</th>
                <th style="text-align: center;" width="20%">费率</th>
                <th style="text-align: center;" width="20%">消费方式</th>
                <th style="text-align: center;" width="20%">分润(万分之几)</th>
            </tr>
            {foreach $data as $key=>$val}
            <tr>
                <td>
                    <input type="checkbox" value="{$key}">
                </td>
                <td>{$val['card_text']}</td>
                <td>{$val['tran_text']}</td>
                <td>{$val['rate_text']}</td>
                <td>{$val['channel_text']}</td>
                <td>
                    <div class="col-xs-12 col-sm-8">
                        <input type="hidden" name="card[]" value="{$val['card']}">
                        <input type="hidden" name="tran[]" value="{$val['tran']}">
                        <input type="hidden" name="rate[]" value="{$val['rate']}">
                        <input type="hidden" name="channel[]" value="{$val['channel']}">
                        <input id="{$key}" {if $val['max'] ==
                        0}data-rule="required"{else/}data-rule="required;range(0~{$val['max']})"{/if}
                        class="form-control" name="profit[]" type="text" value="{$val['profit']}">
                    </div>
                </td>
            </tr>
            {/foreach}
        </table>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
